how set cascade on delete and update in same time in laravel
50
how set cascade on delete and update in same time in laravel -
$table->foreign('user_id')->references('id')->on('users')
->onDelete('SET NULL')
->onUpdate('SET NULL'); // also available CASCADE, RESTRICT, DO NOTHING, NO ACTION